#ifndef __CHANNEL_H__
#define __CHANNEL_H__

#include "linux_def.h"
#include "core.h"


typedef struct{
	int	command;
	pid_t	pid;
	int	slot;
	int	fd;
}channel_t;


int write_channel(int s, channel_t *ch, size_t size);
int read_channel(int s, channel_t *ch, size_t size);	
//int add_channel_event(cycle_t *cycle, int fd, int event, s_event_handler_pt handler);
void close_channel(int *fd);

#endif
